package com.education.quartz;

import com.education.quartz.manage.ScheduleManage;
import com.education.quartz.pojo.ScheduleInfoDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: liftsail
 * @Date: 2022/11/22 16:54
 * @Description: 不积跬步无以至千里
 */
@RestController
@RequestMapping("/quartz")
public class TestQuartzController {

    @Autowired
    private ScheduleManage scheduleManage;

    @GetMapping("/add")
    public String add(Integer courseId, ScheduleInfoDto dto) {

        //Integer courseId, ScheduleInfoDto dto
        String s = scheduleManage.addSchedule(courseId, dto);
        return s;
    }
}
